﻿<Window x:Class="DTC.Popups.WarningPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WarningPopup" Height="220" Width="300" AllowsTransparency="True"
        Background="{StaticResource WindowBackground}" SnapsToDevicePixels="True" WindowStyle="None">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/ButtonsStyles.xaml"/>
                <ResourceDictionary Source="../Resources/Brushes.xaml"/>
                <ResourceDictionary Source="../Resources/BorderStyles.xaml"/>
                <ResourceDictionary Source="../Resources/ToolTipStyles.xaml"/>
                <ResourceDictionary Source="../Resources/TreeViewStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Border Style="{StaticResource PopupBorder}" Margin="5">
        <Border.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFF5858" Offset="1"/>
                <GradientStop Color="#FFFD7373" Offset="0"/>
                <GradientStop Color="#FFBC0303" Offset="0.413"/>
                <GradientStop Color="#FFE71C1C" Offset="0.783"/>
            </LinearGradientBrush>
        </Border.Background>
        <Grid Style="{StaticResource PopupGridStyle}" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Style="{StaticResource PopupColumnStyle}"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Style="{StaticResource PopupTopRowStyle}"/>
                <RowDefinition Style="{StaticResource PopupMiddleRowStyle}"/>
                <RowDefinition Style="{StaticResource PopupBottomRowStyle}"/>
            </Grid.RowDefinitions>
            <Grid MouseLeftButtonDown="StackPanel_MouseLeftButtonDown" Margin="0" HorizontalAlignment="Stretch" Background="#01000000">
                <TextBlock x:Name="TitleBar" Grid.Column="1" Width="Auto" FontWeight="Bold" HorizontalAlignment="Center" Background="Transparent"/>
            </Grid>
            <Border BorderThickness="1" Grid.Row="1" Margin="5" CornerRadius="6" 
                    Background="White" BorderBrush="{StaticResource WindowsContentBorderBrush}">
                <TextBlock Name="MessageContainer" FontSize="14"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center" Text="Сообщение о ошибке" FontFamily="Global Sans Serif"
                           TextWrapping="Wrap"/>
            </Border>
            <Border Grid.Row="2" CornerRadius="0,0,4,4" BorderBrush="Gray" BorderThickness="0,1,0,0">
                <Button x:Name="ReturnButton" Style="{StaticResource AcceptButton}" Grid.Column="0" Click="ReturnButton_Click" HorizontalAlignment="Stretch"
                        Margin="5,6">Вернуться</Button>
            </Border>
        </Grid>
    </Border>

</Window>
